<?php
include "common.php";
class City extends Common{
	function __construct(){
		parent::__construct();
		$this->load->database();
	}
	function getById(){
		$id = $this->input->post('id');
		$arr = $this->Mcity->getById($id);
		$result="";
		foreach ($arr as $key => $value){
			$result.="<option value='$key'>$value</option>";
		}
		echo $result;
	}
	function getByProvinceId(){
		$id = $this->input->post('provinceid');
		$arr = $this->Mcity->getByProvinceId($id);
		$result="";
		foreach ($arr as $key => $value){
			$result.="<option value='$key'>$value</option>";
		}
		echo $result;
	}
}
?>